package cn.mumzone.pos.ui.adapter;

import android.content.Context;

import cn.mumzone.basic.util.ToastUtil;
import cn.mumzone.pos.ui.widgets.shopping.IOnAddDelListener;

/**
 * Created by JoeLjt on 2019/7/2.
 * Email: lijiateng1219@gmail.com
 * Description:
 *
 *    商品数量加减控件 IOnAddDelListener 的包装类，加减回调处理相同，统一封装处理
 *
 */

public class GoodsReturnButtonAdapter implements IOnAddDelListener {

    private Context mContext;

    public GoodsReturnButtonAdapter(Context mContext) {
        this.mContext = mContext;
    }

    @Override
    public void onAddSuccess(int count) {
        onAmountChanged(count);
    }

    @Override
    public void onAddFailed(int count, FailType failType) {
    }

    @Override
    public void onDelSuccess(int count) {
        onAmountChanged(count);
    }

    @Override
    public void onDelFailed(int count, FailType failType) {

    }

    @Override
    public void onInputAreaClicked() {

    }

    @Override
    public boolean beforeAddClick() {
        return false;
    }

    @Override
    public boolean beforeDelClick() {
        return false;
    }

    protected void onAmountChanged(int count){};


}
